package com.xf.arsenal.jdk.thread;

/**
 * @author zouxf
 * @date 2024/5/13 12:42
 * @description
 */
public class AsyncExecuteImpl {
    public static void main(String[] args) {
        AsyncExecute asyncExecute = new AsyncExecute();
        asyncExecute.execute(new Runnable() {
            @Override
            public void run() {
                StringBuilder sbu = new StringBuilder();
                System.out.println(System.getenv("JAVA_HOME"));
            }
        });
        System.out.println(Thread.currentThread().getName());
    }

    static class AsyncExecute{
        public void execute(Runnable runnable){
            Thread thread = new Thread(runnable);
            thread.start();
        }
    }
}
